#ifndef __HAL_UART__
#define __HAL_UART__
#include "osal.h"


// uart event define
typedef enum uartEventEnum{
	UART_RECV_DATA,
	UART_SEND_COMPLETE,
	//I2C_SLAVE_COM_TIME_OUT
}uart_event_e;



typedef struct
{
  osal_event_hdr_t hdr;
  uart_event_e evt;
  
} uartEvent_t;

#define HalUartPrintf(...)	printf(__VA_ARGS__)

extern void HalUartInit(void);

extern uint8 RegisterForUart( uint8 task_id );

extern void HalUartWriteByte(uint8 dat);

extern uint16 HalUartRead(uint8* data,uint16 size);

extern uint8 HalUartWrite(uint8* data,uint16 size);

extern uint8 HalUartTxStaGet(void);


extern uint16 HalUartGetSendUsedSize(void);

extern uint16 HalUartGetSendUnusedSize(void);

extern uint16 HalUartGetRecvUsedSize(void);

extern uint16 HalUartGetRecvUnusedSize(void);




#endif
